package com.kmzx.one.project.mapper;

import com.kmzx.one.project.entity.UserCashback;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;

@Mapper
@Repository
public interface UserCashbackMapper {
    int insert(UserCashback userCashback);

    UserCashback selectById(@Param("cashId") String cashId);

    int updateByIdSelective(UserCashback cashback);

    BigDecimal myAllEverWithdraw(String userId);

    BigDecimal selectMyWithdrawMonth(@Param("userId") String userId, @Param("start") Date start, @Param("end") Date end);
}
